<div class="uk-container uk-container-center" ng-show="loggedIn">
  <div ng-repeat="graphic in graphics">
    <div class="uk-panel uk-panel-box uk-margin-bottom">
      <div class="uk-panel-badge uk-badge" ng-click="toggleParameters(graphic.id)"><i class="fa fa-bars"></i>
      </div>
      <h3 class="uk-panel-title" ng-show="graphic.parameters.visible">{{graphic.parameters.name}}</h3>
      <div class="col-md-11 highlight" ng-show="graphic.parameters.visible">
        <form class="uk-form">
          <fieldset>
            <div class="uk-form-row">
              <div class="uk-form-controls">
                <label class="uk-form-label">Database</label>
                <div class="uk-form-controls">
                  <select ng-model="graphic.parameters.selectedDbid" ng-options="i.DBID as i.DBID_NAME for i in graphic.parameters.dbids">
                    <option value=""></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="uk-form-row">
              <div class="uk-grid" data-uk-grid-margin>
                <div class="uk-width-medium-1-3">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Date debut</label>
                    <div class="uk-form-controls">
                      <input type="text" data-uk-datepicker="{format:'DD/MM/YYYY'}" placeholder="Date debut" ng-model="graphic.parameters.dateDebut" />
                    </div>
                  </div>
                </div>
                <div class="uk-width-medium-1-3">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Date fin</label>
                    <div class="uk-form-controls">
                      <input type="text" data-uk-datepicker="{format:'DD/MM/YYYY'}" placeholder="Date fin" ng-model="graphic.parameters.dateFin" />
                    </div>
                  </div>
                </div>
                <div class="uk-width-medium-1-3">
                </div>
              </div>
            </div>
            <div class="uk-form-row">
              <div class="uk-grid" data-uk-grid-margin>
                <div class="uk-width-medium-1-3">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Heure debut</label>
                    <div class="uk-form-controls">
                      <input type="text" data-uk-timepicker="{format:'24h'}" placeholder="Heure debut" ng-model="graphic.parameters.heureDebut" />
                    </div>
                  </div>
                </div>
                <div class="uk-width-medium-1-3">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Heure fin</label>
                    <div class="uk-form-controls">
                      <input type="text" data-uk-timepicker="{format:'24h'}" placeholder="Heure fin" ng-model="graphic.parameters.heureFin" />
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="uk-form-row">
              <div class="uk-grid" data-uk-grid-margin>
                <div class="uk-width-1-3">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Plages jours</label>
                    <div class="uk-form-controls">
                      <label>
                        <input type="radio" ng-model="graphic.parameters.plageHoraire" ng-value="true">plage</label>
                      <label>
                        <input type="radio" ng-model="graphic.parameters.plageHoraire" ng-value="false">bornes</label>
                    </div>
                  </div>
                </div>
                <div class="uk-width-2-3" ng-show="graphic.parameters.plageHoraire">
                  <div class="uk-form-controls">
                    <label class="uk-form-label">Jours</label>
                    <div class="uk-form-controls">
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.lundi" ng-true-value="true" ng-false-value="false">lundi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.mardi" ng-true-value="true" ng-false-value="false">mardi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.mercredi" ng-true-value="true" ng-false-value="false">mercredi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.jeudi" ng-true-value="true" ng-false-value="false">jeudi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.vendredi" ng-true-value="true" ng-false-value="false">vendredi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.samedi" ng-true-value="true" ng-false-value="false">samedi</label>
                      <label>
                        <input type="checkbox" ng-model="graphic.parameters.dimanche" ng-true-value="true" ng-false-value="false">dimache</label>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </fieldset>
        </form>
        <hr>
      </div>
      <p class="col-md-12 grey">{{graphic.chart.name}}</p>
    </div>
  </div>
  <button class="uk-button uk-button-success" ng-click="addGraphic()"> <i class="fa fa-plus-square"></i> Ajouter un graphique</button>
</div>
